package IO第一天;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;

public class 缓冲流字节数组拷贝文件 {
    public static void main(String[] args) throws Exception{
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("C:\\Users\\峰大帝\\Desktop\\新建文件夹\\456.txt"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("C:\\Users\\峰大帝\\Desktop\\456.txt"));
        int len;
        byte[] data = new byte[1024];
        while ((len = bis.read(data)) != -1){
            bos.write(data,0,len);
        }
        bis.close();
        bos.close();

    }
}
